INTRODUCTION TO WEB DEVELOPMENT:


A.How the Internet Works:

1. Sharing Information

Computers need to exchange data. Initially, a direct cable between two computers allows sending digital signals (1s and 0s). This is the simplest form of a network.

2. Scaling Up

Direct connections between multiple computers become impractical as the number of computers grows. A switch allows many computers in a local area to communicate efficiently, forming a Local Network.

3. Connecting Networks

Routers connect local networks to each other. The Internet is a network of networks, with routers directing traffic between them.

4. Addressing Devices

Every device on the Internet has a unique IP address, so routers know where to send data. Each router only needs to know the next “hop” toward the destination.

5. Reliability and Fairness

Large data is broken into small packets, each numbered and addressed. Packets may take different paths but are reassembled correctly at the destination. Protocols like TCP/IP govern this process.



B.IP ADDRESS

An **IPv4 (Internet Protocol version 4)** address is the classic IP address format everyone is used to seeing.

- **Structure:** It's a 32-bit number. To make it readable for humans, we divide it into four 8-bit sections, and write each section as a decimal number from 0 to 255.

- Example: 172.217.16.142 (one of Google's addresses)

There are two types of IP address:

  1. Public IP Address

    A Public IP address is your **global, unique address on the internet**.
    **Analogy:** The company's main, public phone number.
    **Uniqueness:** It must be **globally unique**. No two devices on the internet can have the same public IP address at the same time.
    **Purpose:** To be reachable from anywhere in the world. This is the address that web servers, email servers, and any other public service use.
    **Assignment:** It is assigned to you by your **Internet Service Provider (ISP)** (Comcast, AT&T, etc.). You don't control it; you lease it from them

  2. Private IP Address

    A Private IP address is a **local address used only *within* your own private network** (e.g., your home Wi-Fi, your office network).
    **Analogy:** The employee's private, 4-digit extension number.
    **Uniqueness:** It only needs to be unique **on your local network**. My laptop can have the address 192.168.1.100 on my home Wi-Fi, and your laptop can have the *exact same address* on your home Wi-Fi. They don't conflict because they are in separate, private networks.
    **Purpose:** To allow devices on the same local network to communicate with each other without needing a globally unique address for each one. Your laptop talks to your printer using private IPs. Your phone streams to your Chromecast using private IPs.
    **Assignment:** It is assigned to your devices by your own **router**.

C.IPV6

IPv6 (Internet Protocol version 6) is the next generation of the Internet Protocol. Its primary purpose was to solve the address exhaustion problem of IPv4.

The fundamental difference is the size of the address:

D.MAC Address

A MAC (Media Access Control) Address is a unique, permanent serial number burned into every network-capable piece of hardware (your laptop's Wi-Fi card, your phone, your smart TV, the network port on your desktop).

mac address

Points to be remember:

A MAC address is a 48-bit number.

To make it readable for humans, it's typically written as 12 hexadecimal digits.

The most common way of displayed is:

  1. Colon-Separated (Most Common)3C:22:FB:A3:B4:C5
  2. Hyphen-Separated (Common on Windows):3C-22-FB-A3-B4-C5
  3. Period-Separated (Used by Cisco and other network gear): 3c22.fba3.b4c5
  4. No Separators (Less common, seen in some software):3C22FBA3B4C5

E.Port Number

  1. Port numbers are numerical identifiers (0-65535) in computer networking that identify specific applications or services on a device.
  2. They work with IP addresses to direct network traffic to the correct service on a machine, with common ports assigned to standard applications like HTTP (port 80) and HTTPS (port 443).
  3. A port number is a 16-bit unsigned integer.
    • 16-bit: This means the number is stored using 16 binary digits (1s and 0s).
    • Unsigned: This means it cannot be negative. The values are all positive
    • Because it's a 16-bit number, the total number of possible ports is 2^16, which equals 65,536.

    There are:

    1. Well-Known Ports (Range: 0 - 1023)

      These are the VIPs of the port world. They are reserved for the most common, fundamental, and standardized internet services.

    2. Registered Ports (Range: 1024 - 49151)

      These ports are for specific applications or services that are not as universal as the "well-known" ones. Companies and developers can register a port for their software to avoid conflicts with other applications.

    3. Dynamic / Private / Ephemeral Ports (Range: 49152 - 65535)

      These ports are not meant for public-facing servers. Their job is completely different.

F.DNS(DOMAIN NAME SYSTEM)

  1. DNS is the global, distributed system.
  2. It translates the human-friendly domain names into the computer-friendly IP addresses
  3. Without it, you'd have to memorize hundreds of IP addresses to browse the web.

Lecture Video


🏠 Homepage | ➡ Next Lecture